
{% extends "base.html" %}
{% load static %}

{% block  title %} 无忧cmdb | 首页{% endblock %}

{% block page-content %}


  <!-- Content Header (Page header) -->
  <section class="content-header">
    <div class="container-fluid">
      <div class="row mb-2">
        <div class="col-sm-6">
          <h1>主机管理</h1>
        </div>
        <div class="col-sm-6">
          <ol class="breadcrumb float-sm-right">
            <li class="breadcrumb-item"><a href="/dashboard/">Home</a></li>
            <li class="breadcrumb-item active">hosts</li>
          </ol>
        </div>
      </div>
    </div><!-- /.container-fluid -->
  </section>
  
  <!-- Main content -->
  <section class="content">
    <div class="container-fluid">
      <div class="row">
        <div class="col-12">
          <div class="card">
            <div class="card-header">
              <h3 class="card-title">资产列表</h3>
            </div>
            <!-- /.card-header -->
            <div class="card-body">
              <table id="example2" class="table table-bordered table-hover">
               
                <thead class="text-center">
                  <tr>
                    <th>序号</th>
                    <th>主机名</th>
                    <th>IP</th>
                    <th>端口</th>
                    <th>用户</th>
                    <th>操作</th>
                  </tr>
                </thead>

               
                <tbody class="text-center">
                  {% for item in remote_user_bind_hosts %}
                    <tr>
                     
                      <td>{{ forloop.counter }}</td>
                      <td>{{ item.host.host_name }}</td>
                      <td>{{ item.host.ip }}</td>
                      <td>{{ item.host.port }}</td>
                      <td>{{ item.remote_user.remote_user_name }}</td>
                      <td>
                        <!-- <span class="hidden">{{ item.id }}</span> -->
                        <a class="btn btn-primary btn-xs">连接</a>
                        <a class="btn btn-success  btn-xs">详情</a>
                        <a class="btn btn-xs btn-info">编辑</a>
                        <a class="btn btn-xs btn-danger  btn-asset-delete ">删除</a>
                      </td>
                    </tr>
                    {% empty %}
                    <tr>没有可用帐号</tr>
                    {% endfor %}
                </tbody>
                <!-- <tfoot>
                  <tr>
                    <th>主机名</th>
                    <th>IP</th>
                    <th>端口</th>
                    <th>版本</th>
                    <th>操作</th>
                  </tr>
                </tfoot> -->
              </table>
            </div>
            <!-- /.card-body -->
          </div>
          <!-- /.card -->
  
          
        </div>
        <!-- /.col -->
      </div>
      <!-- /.row -->
    </div>
    <!-- /.container-fluid -->
  </section>
  <!-- /.content -->


{% endblock %}
